<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <table style="border: 1px solid #ccc">
        <tr>
            <th>员工编号</th>
            <th>员工姓名</th>
            <th>入职日期</th>
            <th>员工工资</th>
            <th>员工部门</th>
            <th>操作</th>
        </tr>
        <tr th:each="e:${emps.records}">
            <td th:text="${e.empno}">员工编号</td>
            <td th:text="${e.ename}">员工姓名</td>
            <td th:text="${#dates.format(e.hiredate,'yyyy-MM-dd')}">入职日期</td>
            <td th:text="${#numbers.formatDecimal(e.sal,2,2)}">员工工资</td>
            <td th:text="${e.dept.dname}" >员工部门</td>
            <td><a th:href="@{'/update/'+${e.empno}}">修改</a></td>
        </tr>
    </table>
        <div>
            <a th:href="@{/selectAll/1/3}">首页</a>
            <a th:href="@{'/selectAll/'+(${emps.current}-1)+'/3'}">上一页</a>
            <a th:href="@{'/selectAll/'+(${emps.current+1})+'/3'}">下一页</a>
            <a th:href="@{'/selectAll/'+(${emps.pages})+'/3'}">末页</a>
        </div>
</body>
</html>